package com.ruoyi.info.service.impl;

import com.ruoyi.info.domain.FhInfoUserinterest;
import com.ruoyi.info.mapper.FhInfoUserinterestMapper;
import com.ruoyi.info.service.IFhInfoUserinterestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户兴趣点Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-09
 */
@Service
public class FhInfoUserinterestServiceImpl implements IFhInfoUserinterestService 
{
    @Autowired
    private FhInfoUserinterestMapper fhInfoUserinterestMapper;

    /**
     * 查询用户兴趣点
     * 
     * @param id 用户兴趣点主键
     * @return 用户兴趣点
     */
    @Override
    public FhInfoUserinterest selectFhInfoUserinterestById(Long id)
    {
        return fhInfoUserinterestMapper.selectFhInfoUserinterestById(id);
    }

    /**
     * 查询用户兴趣点列表
     * 
     * @param fhInfoUserinterest 用户兴趣点
     * @return 用户兴趣点
     */
    @Override
    public List<FhInfoUserinterest> selectFhInfoUserinterestList(FhInfoUserinterest fhInfoUserinterest)
    {
        return fhInfoUserinterestMapper.selectFhInfoUserinterestList(fhInfoUserinterest);
    }

    /**
     * 新增用户兴趣点
     * 
     * @param fhInfoUserinterest 用户兴趣点
     * @return 结果
     */
    @Override
    public int insertFhInfoUserinterest(FhInfoUserinterest fhInfoUserinterest)
    {
        return fhInfoUserinterestMapper.insertFhInfoUserinterest(fhInfoUserinterest);
    }

    /**
     * 修改用户兴趣点
     * 
     * @param fhInfoUserinterest 用户兴趣点
     * @return 结果
     */
    @Override
    public int updateFhInfoUserinterest(FhInfoUserinterest fhInfoUserinterest)
    {
        fhInfoUserinterest.setUpdateTime(LocalDateTime.now());
        return fhInfoUserinterestMapper.updateFhInfoUserinterest(fhInfoUserinterest);
    }

    /**
     * 批量删除用户兴趣点
     * 
     * @param ids 需要删除的用户兴趣点主键
     * @return 结果
     */
    @Override
    public int deleteFhInfoUserinterestByIds(Long[] ids)
    {
        return fhInfoUserinterestMapper.deleteFhInfoUserinterestByIds(ids);
    }

    /**
     * 删除用户兴趣点信息
     * 
     * @param id 用户兴趣点主键
     * @return 结果
     */
    @Override
    public int deleteFhInfoUserinterestById(Long id)
    {
        return fhInfoUserinterestMapper.deleteFhInfoUserinterestById(id);
    }
}
